package demo;

import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
public class Worker implements Serializable {
    public String name = "强子";

    public Saw saw;

    public void setSaw(Saw saw){
        this.saw = saw;
    }

    public void  work(){
        System.out.printf(name+"使用"+saw);
    }

}
